﻿<UserControl 
    x:Class="SimpleDbBrowser.View.Views.OptionsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    mc:Ignorable="d" 
    Width="400"
    >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
         </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" MinWidth="25"/>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        <Label 
            Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
            Style="{StaticResource DefaultLabelStyle}"
            Content="_Access Key:" 
            Target="{Binding ElementName=AccessKey}"
            />
        
        <TextBox
            x:Name="AccessKey"
            Grid.Column="2" Grid.Row="0"
            Style="{StaticResource DefaultTextBoxStyle}"
            Text="{Binding AccessKey}"
            />
        
        <Label
            Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
            Style="{StaticResource DefaultLabelStyle}"
            Content="_Secret Key:"
            Target="{Binding ElementName=SecretKey}"
            />
        
        <TextBox
            x:Name="SecretKey"
            Grid.Row="1" Grid.Column="2"
            Style="{StaticResource DefaultTextBoxStyle}"
            Text="{Binding SecretKey}"
            />
        
        <DockPanel
            Grid.Row="2" Grid.ColumnSpan="3"
            >
            <CheckBox 
                x:Name="ProxySupport"
                DockPanel.Dock="Left"
                Style="{StaticResource DefaultCheckBoxStyle}"
                Content="Enable Proxy Support"
                IsChecked="{Binding EnableConnectionSettings}"
                />
            <Separator Margin="3" />
        </DockPanel>
        
        <Label 
            Grid.Row="3" Grid.Column="1"
            Style="{StaticResource DefaultLabelStyle}"
            Content="Host:" 
            IsEnabled="{Binding ElementName=ProxySupport, Path=IsChecked}"
            />
        
        <TextBox
            x:Name="ProxyHost"
            Grid.Row="3" Grid.Column="2"
            Style="{StaticResource DefaultTextBoxStyle}"
            Text="{Binding ProxyHost}"
            IsEnabled="{Binding ElementName=ProxySupport, Path=IsChecked}"
            />
        
        <Label 
            Grid.Row="4" Grid.Column="1"
            Style="{StaticResource DefaultLabelStyle}"
            Content="Port:"
            IsEnabled="{Binding ElementName=ProxySupport, Path=IsChecked}"
            />
        
        <TextBox
            x:Name="ProxyPort"
            Grid.Row="4" Grid.Column="2"
            Style="{StaticResource DefaultTextBoxStyle}"
            Text="{Binding ProxyPort}"
            IsEnabled="{Binding ElementName=ProxySupport, Path=IsChecked}"
            />
    </Grid>
</UserControl>
